<template>
  <div>
    <SendNotification1></SendNotification1>
    <Danmu ref="danmuComponent" />
    <button @click="addNewDanmu">添加弹幕</button>
  </div>
</template>

<script>
import Danmu from '@/components/Danmu.vue';
import SendNotification1 from '@/components/SendNotification1.vue';

export default {
  components: {
    Danmu,
    SendNotification1,
  },
  methods: {
    addNewDanmu() {
      this.$refs.danmuComponent.addDanmu('这是一个弹幕');
    },
  },
};
</script>
